import { Component, OnInit } from '@angular/core';
import { PrimeNGConfig } from 'primeng/api';
import { PrimeTable } from '../../../@core/data/prime-table';
import { PrimeTableService } from '../../../@core/service/prime-table.service';

@Component({
  selector: 'prime-table',
  templateUrl: './prime-table.component.html',
  styleUrls: ['./prime-table.component.scss']
})

export class PrimeTableComponent implements OnInit {

  constructor(private primetableService: PrimeTableService) {}

  ngOnInit(): void {
    this.getPrimelists();
  }

  loading: boolean = true;

  activityValues: number[] = [0, 100];

  primeList: PrimeTable[];

  getPrimelists(): void {
    this.primetableService.getPrimelists()
        .subscribe(primeList => {
          this.primeList = primeList;
          this.loading = false;
        })
  }

}
